<template>
<p :style="{color:'red',fontFamily:'宋体'}">你好</p>
<p :style="object">你好</p>
</template>

<script>
export default {
  name: "Style",
  data(){
    return{
      //绑定成对象来实现样式绑定
       object:{
         color:'red',
         fontFamily:'宋体',
         fontSize:'30px'
       }
    }
  }
}
</script>

<style scoped>

</style>
